package com.jhrc.portal.ws.message;

/**
 * 【通用消息组件】
 *
 * @Author: luanxd
 * @Date: 2020-05-12 14:46
 */
public class Msg {

    /**
     * 消息类型：
     * -5:代表心跳；
     * -1：代表服务器端返回给客户端的一些错误提示；
     * 0：代表成功信息；
     * 1~无穷大:代表自定义的信息
     */
    private Integer type;
    private Object msg;

    public Msg() {
    }

    public Msg(Integer type, Object msg) {
        this.type = type;
        this.msg = msg;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Object getMsg() {
        return msg;
    }

    public void setMsg(Object msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "Msg{type='" + type + "'" +
                ", msg='" + msg + "'" +
                "}";
    }

}